package com.ghca.myinfo3.system.controller;

import com.ghca.myinfo3.system.entity.Permission;
import com.ghca.myinfo3.system.service.IPermissionService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * Created by gh on 2016/12/20.
 */
@Controller
@RequestMapping("/system/permission")
public class PermissionController {

    @Resource
    private IPermissionService permissionService;

    @ResponseBody
    @RequestMapping("{id}")
    public Permission one(@PathVariable Long id){
        return permissionService.findRoot(id);
    }


}
